package com.film.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.film.domain.ReviewAndFilm;

public class ReviewAndFilmRowmapper implements RowMapper<ReviewAndFilm>{

	@Override
	public ReviewAndFilm mapRow(ResultSet res, int arg1) throws SQLException {
		ReviewAndFilm reviewAndFilm = new ReviewAndFilm();
		reviewAndFilm.setRevieScorewSum(res.getInt("score"));
		reviewAndFilm.setReviewCount(res.getInt("count"));
		
		return reviewAndFilm;
	}

}
